<%@ Control Language="C#"  %>
<%@ Import Namespace="Dimok.Web.UI" %>
<script runat="server">
	protected override void OnInit(EventArgs e) {
		base.OnInit(e);
		btnInsert.Click += new EventHandler(InsertRow);
	}
</script>

<asp:Button ID="btnInsert" Text="New" style="border-color:Gray;background-color:"
	OnClientClick="return confirm('Add new record?')"
	runat="server" Width="100%" BackColor="LightSteelBlue" BorderColor="Gray" />

<script runat=server>
	private void InsertRow(object sender, EventArgs e){
		try {
			((GridViewEx)((WebControl)sender).NamingContainer.NamingContainer.NamingContainer).InsertRow();
		} catch (Exception exc) {
			throw new SmartException(exc);
		}
	}
</script>